﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LikeTry.Logic;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
using LikeTryCore;
using Contract;

namespace LikeTry
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var name = Session["UserName"];
            if (name == null)
            {
                Response.Redirect("Logon.aspx");
            }

            if (Request.QueryString["oper"] != null && Request.QueryString["id"] != null)
            {
                 LikeTryCore.LikeTry.DeleteAccount(Request.QueryString["id"].Trim());
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Response.Redirect("AccountManage.aspx");
        }

        protected void Button3_Click(object sender, EventArgs e)
        {

        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            Session.Abandon();
            Response.Redirect("~/Logon.aspx");
        }
    }
}